{%extends "base.html"%}
{% comment %}
Copyright 2010 Lorenzo Benfenati, Andrea Zucchelli"
This file is part of MyMovieCollection.

MyMovieCollection is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3 as published by
the Free Software Foundation.

MyMovieCollection is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with MyMovieCollection. If not, see <http://www.gnu.org/licenses/>
{% endcomment %}
{%block title%}MMC: File - {{file.filename}}{%endblock title%}
{%block content%}
{%if file.title %}
<div class="title"> 
<a href="{% url mymc.views.view_title_html file.title_id %}">{{file.title.title}}</a>
</div>
{%else%}
<div class="title">{{file.filename}}</div>
{%endif%}
<div class="colright70">
<div class="listitemtitle">{{file.filename}}</div>
<div class="listitemelement" >({{file.path}})</div>
<div class="listitemelement" ><a href="{%url mymc.views.download_file file.id%}">Download</a></div> <div class="spacer"></div>
<div class="listitemelement" ><a href="{%url mymc.views.playlist file.id%}">Play</a></div> <div class="spacer"></div>
<div >Storage: <a href="{% url mymc.views.view_title_html file.storage_id %}">{{file.storage}}</a></div>
<div class="listitemelement" >Size: {{file.size}}</a></div>
<div  class="listitemelement">Hash: {{file.hash}}</a></div>
<div  class="listitemelement">Hashtype: {{file.hashtype}}</a></div>
<div class="listitemelement" >Quality: {{file.quality}}</a></div>
<div  class="listitemelement">Container: {{file.container}}</a></div>
<div  class="listitemelement">Video codec: {{file.videocodec}}</a></div>
<div  class="listitemelement">Audio codec: {{file.audiocodec}}</a></div>
<div class="listitemelement"><a href="{%url mymc.views.edit 'File' file.id%}">Edit</a> </div>
</div>
<div class="colleft70">
	<div>{%if file.container == "AVI "%}
		<!--<object data="{%url mymc.views.download_file file.id%}" type="video/avi" /> -->
		<video src="{% if prefix %}{{prefix}}{{file.storage.id}}/{{file.path|iriencode}}{%else%}http://{{site_name}}{%url mymc.views.download_file file.id%}{%endif%}" controls="controls"></video> 
		{%endif%}
	</div>
<div><a href="{%url streamer.views.stream_file file.id%}" >Start streaming</a></div>
</div>
{%endblock content%}
